package com.coincalf.feign.hystrix;

import com.coincalf.dto.MatchDTO;
import com.coincalf.dto.TxDTO;
import com.coincalf.feign.MatchServiceClient;
import com.coincalf.framework.http.Response;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Description:
 * @Author: Chen Long
 * @Date: Created in 2018/5/20 下午5:28
 * @Modified by: Chen Long
 */
@Component
public class MatchServiceClientFallback implements MatchServiceClient {

    /**
     * 币币交易撮合完成后更新缓存
     * @param matchDTO
     */
    @Override
    public Response tradeMatch(@RequestBody MatchDTO matchDTO) {
        return Response.ok("降级");
    }

    /**
     * 创新交易撮合完成后更新缓存
     * @param matchDTO
     */
    @Override
    public Response forexMatch(@RequestBody MatchDTO matchDTO) {
        return Response.ok("降级");
    }

    @Override
    public Response match(TxDTO txDTO) {
        return null;
    }
}
